public class Calci1
{
public static long SumOfArray(int[] a)
 {	
	long sum = 0 ;
	for(int i=0;i<a.length;i++)
	sum = sum + a[i]; 
	return sum;
}
	
public static int[] randomInt(int num) 
  {
	int[] a = new int[num];
	for(int i = 0; i<num; i++)
	a[i]=(int) (Math.random()*100);
	return a;
}
	
	
public static double[] randomDouble(int num) 
  {
	double[] a = new double[num];
	for(int i = 0; i<num; i++)
	a[i]=Math.random()*100;
	return a;
}
	
public static char[] randomChar(int num) 
  {
	char temp;
	char[] a = new char[num];
	int i=0;
	while(i<num) 
	{
	 temp = (char) (Math.random()*100);
	 if((temp >='a' && temp <= 'z' )||(temp >= 'A' && temp <= 'Z'))
	a[i++]=temp;	
	}
	return a;
}
	
public static void printInt(int[] array)
 {
		for(int i=0;i<array.length;i++)
		System.out.print(array[i] + ",");
}
	
public static void printDouble(double[] array)
 {
		for(int i=0;i<array.length;i++)
		System.out.print(array[i] + ",");
}
	
public static void printChar(char[] array)
 {
		for(int i=0;i<array.length;i++)
		System.out.print(array[i] + ",");
}
	
public static int maxArray(int[] array)
 {
	
	int max=0;
	for(int i=0;i<array.length;i++)
		if(max<array[i])
		max = array[i];
	return max;
}
public static int[] revInt(int[] array)
 {
	
	int[] rev = new int[array.length];
	for(int i=0;i<array.length;i++)
	rev[array.length-i-1] = array[i];
	return rev;
	
}
public static char[] revChar(char[] array)
 {
	char[] rev = new char[array.length];
	for(int i=0;i<array.length;i++)
	rev[array.length-i-1] = array[i];
	return rev;
}
	
public static int countVowel(char[] array)
 {
	int count=0;
	for(int i=0;i<array.length;i++)
	if(array[i]=='a'||array[i]=='e'||array[i]=='i'||array[i]=='o'||array[i]=='u'||
	array[i]=='A'||array[i]=='E'||array[i]=='I'||array[i]=='O'||array[i]=='U')
	count++;
	return count;
}
	
public static int[] generateEven(int num1,int num2)
 {
	int[] array = new int[50];
	for(int i=num1,j=0;i<=num2;i++,j++)
	if(i%2==0)
	array[j]=i;
	else
	j--;
	return array;
}
	
	
public static int[] generateOdd(int num1,int num2)
 {
	int[] array= new int[50];
	for(int i=num1,j=0;i<=num2;i++,j++)
	if(!(i%2==0))
	array[j]=i;
	else
	j--;
	return array;
}
	
public static int[] generatePrime(int num1,int num2)
 {
	int[] array = new int[50];
	for(int i=num1,j=0;i<=num2;i++,j++)
	if(isPrime(i))
	array[j]=i;
	else
	j--;
	return array;
}

public static boolean isPrime(long num)
 {
	boolean result = false;
	long count = 0;
	long i=2;
	while(i <= num/2) {
	if(num%i == 0)
	count++;
	i++;
}
	if(count == 0 && num != 1 && num != 0)
	result = true;
	return result;
}	
	
	
public static int[] generateFibonacci(int num)
 {

	   int[] fib=new int[num];
 	   fib[0] = 0;
	   fib[1] = 1; 
	   for(int i=2;i<fib.length;i++)
	 {
	   fib[i]=fib[i-1]+fib[i-2];
	 }
	return (fib);   
}

}